package com.fqgj.sentry.api.domain;

import java.io.Serializable;
import java.util.List;

/**
 * Created by ykpbean kangping.ying@yuntu-inc.com
 *
 * @description
 * @create 2017-08-15 上午10:32
 */


public class ApiPolicy implements Serializable{
    /**
     * 策略类型 1：规则组 2：评分卡
     */
    private Integer policyType;
    /**
     * 策略名
     */
    private String strategyName;
    /**
     * 策略id
     */
    private Long policyId;

    /**
     * 策略匹配模式
     */
    private String policyMode;

    /**
     * 公用规则  是否命中
     */
    private Boolean hitCommonRule;


    //===========最终规则=========

    /**
     * 命中的规则的集合
     */
    private List<HitRule> hitRules;

    //==========决策结果============

    /**
     * 审核 结果
     */
    private DecisionResult decisionResult;
    private WeightResult weightResult;

    /**
     * 评分卡 策略是评分卡时有效 评分卡变量需要传递给下层规则使用
     */
    private ScoreCard scoreCard;

    public Boolean getHitCommonRule() {
        return hitCommonRule;
    }

    public ApiPolicy setHitCommonRule(Boolean hitCommonRule) {
        this.hitCommonRule = hitCommonRule;
        return this;
    }


    public Integer getPolicyType() {
        return policyType;
    }

    public ApiPolicy setPolicyType(Integer policyType) {
        this.policyType = policyType;
        return this;
    }



    public String getStrategyName() {
        return strategyName;
    }

    public ApiPolicy setStrategyName(String strategyName) {
        this.strategyName = strategyName;
        return this;
    }

    public Long getPolicyId() {
        return policyId;
    }

    public ApiPolicy setPolicyId(Long policyId) {
        this.policyId = policyId;
        return this;
    }

    public String getPolicyMode() {
        return policyMode;
    }

    public ApiPolicy setPolicyMode(String policyMode) {
        this.policyMode = policyMode;
        return this;
    }

    public WeightResult getWeightResult() {
        return weightResult;
    }

    public ApiPolicy setWeightResult(WeightResult weightResult) {
        this.weightResult = weightResult;
        return this;
    }

    public ScoreCard getScoreCard() {
        return scoreCard;
    }

    public ApiPolicy setScoreCard(ScoreCard scoreCard) {
        this.scoreCard = scoreCard;
        return this;
    }

    public List<HitRule> getHitRules() {
        return hitRules;
    }

    public ApiPolicy setHitRules(List<HitRule> hitRules) {
        this.hitRules = hitRules;
        return this;
    }

    public DecisionResult getDecisionResult() {
        return decisionResult;
    }

    public ApiPolicy setDecisionResult(DecisionResult decisionResult) {
        this.decisionResult = decisionResult;
        return this;
    }
}
